package com.ld.security.demo.modules.admin.api;

import com.ld.security.common.tomcat.util.RespUtil;
import com.ld.security.server.admin.modules.gl.entity.GlConfigEntity;
import com.ld.security.server.admin.modules.gl.service.IGlConfigService;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class AppApi {

    @Autowired
    IGlConfigService iGlConfigService;

    private String javaCode="java";

    @SneakyThrows
    @RequestMapping(value = "/",method = RequestMethod.GET)
    public void index(){

        GlConfigEntity configEntity =  iGlConfigService.getDefultConfig(javaCode);
        RespUtil.sendRedirect(configEntity.getVue());

    }




}
